/**公用方法 */
import moment from 'moment'

export default {
    setTimer(time) {
        return moment(time).format("YYYY-MM-DD HH:mm:ss");
    },
    // 考勤类型
    attendType(type) {
        switch (type) {
            case '0':
                type = "考勤类型";
                break;
            case '1':
                type = "考勤事件";
                break;
        }
        return type;
    },
    // 权限类型
    authorityType(type) {
        switch (type) {
            case 0:
                type = "菜单";
                break;
            case 1:
                type = "子菜单";
                break;
            case 2:
                type = "按钮";
                break;
            case 3:
                type = "数据";
                break;
        }
        return type;
    },
}